<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ page import="support.*, java.util.*" %>

<h1>Your Degree(s)</h1>

<%
	Applicant applicant = (Applicant) session.getAttribute("applicant");
	LinkedList<Degree> degrees = new LinkedList<Degree>();
	if (applicant != null) degrees = applicant.getDegrees();
	
	if (degrees != null){
		int count = 0;
		for (Degree d: degrees) {
			University u = d.getUniversity();
			%>
			<h3>Degree <%= ++count %></h3>
			<table>
				<tr>
					<td><b>University</b></td> <td><%= u.getName() %></td>
				</tr>
				<tr> 
					<td><b>Location</b></td> <td><%= u.getLocation().getName() %></td>
				</tr>
				<tr>
					<td><b>Major</b></td> <td><%= d.getMajor().getName() %> </td>
				</tr>
				<tr>
					<td><b>Awarded Date</b></td> <td><%= d.getMonth() %> / <%= d.getYear() %> </td>
				</tr>
				<tr>
					<td><b>GPA</b></td> <td><%= d.getGpa() %> </td>
				</tr>
				<tr>
					<td><b>Title</b></td> <td><%= d.getTitle() %> </td>
				</tr>
			</table>
			<%
		}
	}
%>